#include<iostream>
using namespace std;
class Base {
public:
	virtual void  foo() {
		cout << "Base::foo" << endl;
	};

	void call_foo() {
		foo();
	}
};

class Derive :public Base {
public:
	void foo() {
		cout << "Derive::foo" << endl;
	}
};

int main() {
	Base* base = new Derive();
	base->call_foo();
}